package com.matrix.review.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.matrix.review.entity.ReviewItem;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.Map;

/**
 * @author 有点甜
 * @since 2025/7/27
 */
@Mapper
public interface ReviewItemMapper extends BaseMapper<ReviewItem> {
    @MapKey("product_id")
    Map<Long, Map<String, Object>> calculateAverageRatingsByShopId(Long shopId);
}
